# Maintainer: Marty Plummer (The_NetZ) <ntzrmtthihu777 (at) gmail (dot) com>
# Contributor: Giovanni Scafora <giovanni@archlinux.org>
# Contributor: Dan McGee <dan@archlinux.org>

pkgname=irssi
pkgver=0.8.17
pkgrel=0
pkgdesc="Modular text mode IRC client with Perl scripting"
arch=('i686' 'x86_64')
url="http://irssi.org/"
license=('GPL')
depends=('glib2-devel' 'openssl' 'libcrypt-devel' 'pcre-devel')
optdepends=('perl-libwww: for the scriptassist script')
backup=('etc/irssi.conf')
source=("http://irssi.org/files/${pkgname}-${pkgver}.tar.bz2"
        "0000_msysize.patch")
options=('!strip')
md5sums=('ecf64be47978d89a742b435a81cb47db'
         '0fcc84aa7fcda66e5f97966bd3897bde')

prepare() {
  cd "${srcdir}/${pkgname}-${pkgver}"
  patch -p1 -i ${srcdir}/0000_msysize.patch
}

build() {
  cd "${srcdir}/${pkgname}-${pkgver}"

  ./configure \
    --disable-glibtest \
    --enable-ipv6 \
    --sysconfdir=/etc \
    --with-perl-lib=vendor \
    --build=${CHOST}
  make
}

package() {
  cd "${srcdir}/${pkgname}-${pkgver}"

  make DESTDIR="${pkgdir}" install
}
